package com.rt.easyjava.common.dozer;

import org.dozer.DozerBeanMapper;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by wxy on 2017/9/14.
 */
public class DozerBeenMapperPlus<T1,T2> extends DozerBeanMapper{

    public List<T2> mapList(List<T1> list, Class<T2> clazz){

        List<T2> returnList = new ArrayList<>();
        for(T1 bean:list){
            if(bean==null)continue;
            T2 dto = map(bean,clazz);
            returnList.add(dto);
        }

        return returnList;
    }




}
